import http from '@/utils/request.js'
/**
 * 获取采购单列表
 * @param {*} page
 * @param {*} limit
 * @param {*} groupId
 */
export const purchaseList = (page, limit, groupId) => {
  return http({
    method: 'post',
    url: '/api/Purchase/index',
    data: {
      page,
      limit,
      groupId
    }

  })
}
/**
 * 获取采购单详情
 * @param {*} groupId
 */
export const purchaseDetails = (groupId) => {
  return http({
    method: 'post',
    url: '/api/Purchase/details',
    data: {
      groupId
    }

  })
}
/**
 * 获取选择框列表
 */
export const purchaseSelectList = () => {
  return http({
    method: 'post',
    url: '/api/Purchase/selectList'
  })
}
/**
 * 添加任务提交
 * @param {*} workDescribe
 * @param {*} workClass
 * @param {*} groupId
 * @param {*} fileParams
 * @param {*} systemUserId
 * @param {*} assignedTo
 */
export const addWorkSubmit = (workDescribe, workClass, groupId, fileParams, systemUserId, assignedTo) => {
  return http({
    method: 'post',
    url: '/api/Purchase/addWork',
    data: {
      workDescribe,
      workClass,
      groupId,
      fileParams,
      systemUserId,
      assignedTo
    }

  })
}
/**
 * 上传图片
 */
export const uploadImage = (file) => {
  return http({
    method: 'post',
    url: '/api/Purchase/uploadImage',
    data: {
      file
    }

  })
}
/**
 * 获取初始人员id信息
 * @param {*} groupId
 */
export const getInitIdList = (groupId) => {
  return http({
    method: 'post',
    url: '/api/Purchase/getInitIdList',
    data: {
      groupId
    }

  })
}
